<?php

/*
 * @Homepage for application
 * @verion 1.0
 * @author Roshan
 */

class Application extends base {

    protected $_view;

    public function __construct() {
        $this->setView();
    }

    public function run($view = '') {

        switch (params::getParam('action')) {

            case 'new':
                break;

            case '':
                break;

            case 'all':
                $args=array();
                $args[]='item-one';
                $args[]='item-two';
                print_r(item::newInstance()->findBySlug($args));
                $this->setView('ads-all.phtml');

                break;
        }

        $this->dispatch();
    }

    public function dispatch() {
        include current_theme_path() . $this->_view;
    }

}